﻿using FI.Core.Configuration;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FI.EntityFramework.Configuration
{ 
    /// <summary>
    /// Configuration settings for system field.
    /// </summary>
    public class SystemFieldData : NamedConfigurationElement
    {
        /// <summary>
        /// Uses to get the name of created by field.
        /// </summary>
        public const string CreatedBy = "CreatedBy";

        /// <summary>
        /// Uses to get the name of created time field.
        /// </summary>
        public const string CreatedTime = "CreatedTime";

        /// <summary>
        /// Uses to get the name of last updated by field.
        /// </summary>
        public const string LastUpdatedBy = "LastUpdatedBy";

        /// <summary>
        /// Uses to get the name of last update time field.
        /// </summary>
        public const string LastUpdatedTime = "LastUpdatedTime";

        /// <summary>
        /// Uses to get the name of transaction id field.
        /// </summary>
        public const string TransactionId = "TransactionId";

        /// <summary>
        /// Uses to get the name of version no field.
        /// </summary>
        public const string VersionNo = "VersionNo";

        /// <summary>
        /// The i connect state
        /// </summary>
        public const string IConnectState = "IConnectState";

        private const string FieldNameProperty = "fieldName";

        /// <summary>
        /// Gets the name of system field.
        /// </summary>
        /// <value>The name of the field.</value>
        [ConfigurationProperty(FieldNameProperty, IsRequired = true)]
        public string FieldName
        {
            get { return (string)base[FieldNameProperty]; }
            set { base[FieldNameProperty] = value; }
        }
    }
}
